package com.tac.actions.loginActions;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

public class LoginActions {

    public void login(ChromeDriver driver) throws InterruptedException {

        //业务
        //点击账号登录
        driver.findElementByCssSelector(".login-tabs-header > li:nth-child(2)").click();

        //输入账号密码
        WebElement elementByCssSelector = driver.findElementByCssSelector(".login-panel.clearfix.login-panel-account>div.input-wrap:nth-child(1)>input");
        elementByCssSelector.sendKeys("apaaslkk");
        WebElement elementByCssSelector1 = driver.findElementByCssSelector(".login-panel.clearfix.login-panel-account>div.input-wrap:nth-child(2)>input");
        elementByCssSelector1.sendKeys("UIAutoTest");
        WebElement elementByCssSelector2 = driver.findElementByCssSelector(".login-panel.clearfix.login-panel-account>div.input-wrap:nth-child(3)>input");
        elementByCssSelector2.sendKeys("a888888");

        //点击登录
        driver.findElementByCssSelector(".login-panel.clearfix.login-panel-account>button:nth-child(5)").click();
        Thread.sleep(1000);


    }
}
